// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from '@/store'
import _ from '@/helper/lodash'
import dateFns from '@/helper/date-fns'
import eventBus from '@/components/common/eventBus'
import { Menu, MenuItem, MenuItemGroup, Submenu, Tabs, TabPane, Loading,
         Table, TableColumn, Tooltip, Button, Dialog, Form, FormItem, Input, InputNumber,
         Breadcrumb, BreadcrumbItem, MessageBox, Message, Row, Col,
         DatePicker, Pagination, Autocomplete, Checkbox, CheckboxButton, Select, CheckboxGroup, Radio,
         RadioButton, Option, Upload, Dropdown, DropdownMenu, DropdownItem, Tree,
         Popover, Switch, Slider, Tag, RadioGroup, TimePicker, TimeSelect, Progress, ColorPicker} from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VCharts from 'v-charts'
import 'v-charts/lib/style.css'
import vDrag from '@/directives/drag'
// 加载element-ui
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Tooltip)
Vue.use(Button)
Vue.use(Dialog)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(InputNumber)
Vue.use(Menu)
Vue.use(MenuItem)
Vue.use(MenuItemGroup)
Vue.use(Submenu)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Row)
Vue.use(Col)
Vue.use(DatePicker)
Vue.use(TimePicker)
Vue.use(Pagination)
Vue.use(Autocomplete)
Vue.use(Checkbox)
Vue.use(CheckboxButton)
Vue.use(Select)
Vue.use(Option)
Vue.use(CheckboxGroup)
Vue.use(CheckboxButton)
Vue.use(Upload)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Tree)
Vue.use(Popover)
Vue.use(Switch)
Vue.use(Slider)
Vue.use(Radio)
Vue.use(Tag)
Vue.use(RadioGroup)
Vue.use(RadioButton)
Vue.use(TimeSelect)
Vue.use(Progress)
Vue.use(ColorPicker)
Vue.use(VCharts)

Vue.use(Loading.directive)
Vue.prototype.$loading = Loading.service
Vue.prototype.$msgbox = MessageBox
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$prompt = MessageBox.prompt
Vue.prototype.$notify = Notification
Vue.prototype.$message = Message
Vue.prototype.$_ = _
Vue.prototype.$date = dateFns
Vue.prototype.$bus = eventBus

Vue.config.productionTip = false
Vue.use(vDrag)
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})
